Optimal. Leaf size=46 \[ \frac {\tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {x}{a^3}-\frac {4 \tan (c+d x)}{a^2 d (a \sec (c+d x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 48, normalized size of antiderivative = 1.04, number of steps used = 12, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3888, 3886, 3473, 8, 2606, 3767, 2621, 321, 207} \[ \frac {4 \cot (c+d x)}{a^3 d}-\frac {4 \csc (c+d x)}{a^3 d}+\frac {\tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {x}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 207
Rule 321
Rule 2606
Rule 2621
Rule 3473
Rule 3767
Rule 3886
Rule 3888
Rubi steps
\begin {align*} \int \frac {\tan ^4(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=\frac {\int \cot ^2(c+d x) (-a+a \sec (c+d x))^3 \, dx}{a^6}\\ &=\frac {\int \left (-a^3 \cot ^2(c+d x)+3 a^3 \cot (c+d x) \csc (c+d x)-3 a^3 \csc ^2(c+d x)+a^3 \csc ^2(c+d x) \sec (c+d x)\right ) \, dx}{a^6}\\ &=-\frac {\int \cot ^2(c+d x) \, dx}{a^3}+\frac {\int \csc ^2(c+d x) \sec (c+d x) \, dx}{a^3}+\frac {3 \int \cot (c+d x) \csc (c+d x) \, dx}{a^3}-\frac {3 \int \csc ^2(c+d x) \, dx}{a^3}\\ &=\frac {\cot (c+d x)}{a^3 d}+\frac {\int 1 \, dx}{a^3}-\frac {\operatorname {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{a^3 d}+\frac {3 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d}-\frac {3 \operatorname {Subst}(\int 1 \, dx,x,\csc (c+d x))}{a^3 d}\\ &=\frac {x}{a^3}+\frac {4 \cot (c+d x)}{a^3 d}-\frac {4 \csc (c+d x)}{a^3 d}-\frac {\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{a^3 d}\\ &=\frac {x}{a^3}+\frac {\tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {4 \cot (c+d x)}{a^3 d}-\frac {4 \csc (c+d x)}{a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.27, size = 117, normalized size = 2.54 \[ \frac {8 \cos ^5\left (\frac {1}{2} (c+d x)\right ) \sec ^3(c+d x) \left (\cos \left (\frac {1}{2} (c+d x)\right ) \left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+d x\right )-4 \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )\right )}{a^3 d (\sec (c+d x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.78, size = 83, normalized size = 1.80 \[ \frac {2 \, d x \cos \left (d x + c\right ) + 2 \, d x + {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 8 \, \sin \left (d x + c\right )}{2 \, {\left (a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 3.67, size = 63, normalized size = 1.37 \[ \frac {\frac {d x + c}{a^{3}} + \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} - \frac {4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.60, size = 76, normalized size = 1.65 \[ -\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \,a^{3}}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{3} d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{3} d}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.51, size = 98, normalized size = 2.13 \[ \frac {\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} + \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}} - \frac {4 \, \sin \left (d x + c\right )}{a^{3} {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.16, size = 37, normalized size = 0.80 \[ \frac {x}{a^3}+\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\tan ^{4}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________